package com.example.demo.demos.controller;

import com.example.demo.demos.pojo.Order;
import com.example.demo.demos.service.IOrderService;
import com.example.demo.demos.utils.OrderInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
@CrossOrigin

public class OrderController {
    @Autowired
    private IOrderService orderService;
    @RequestMapping("/xiadan")
    public OrderInfo xiadan( Order order){
        System.out.println(order.toString());
       return orderService.xiadan(order);
    }
}
